﻿using AbpLocalization.ApiHost;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Modularity;

[DependsOn(
    typeof(AbpAspNetCoreMvcModule),
    typeof(MyLocalizationModule)
    )]
public class AbpLocalizationApiHostModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        var services = context.Services;
        services.AddControllers();
        services.AddSwaggerGen();

    }

    public override void OnApplicationInitialization(ApplicationInitializationContext context)
    {
        var app = (WebApplication)context.GetApplicationBuilder();

        app.UseAuthorization();

        app.UseSwagger();
        app.UseSwaggerUI();
        app.MapControllers();

    }
}